package com.wzkun.aicraft.model.dto.chathistory;

import com.wzkun.aicraft.common.PageRequest;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 对话历史分页查询请求类
 *
 * @author wzk
 * @since 2023/11/15
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Schema(description = "对话历史分页查询请求类")
public class ChatHistoryQueryRequest extends PageRequest implements Serializable {

    /**
     * id
     */
    @Schema(name = "id", description = "id")
    private Long id;

    /**
     * 消息内容
     */
    @Schema(name = "message", description = "消息内容")
    private String message;

    /**
     * 消息类型（user/ai）
     */
    @Schema(name = "messageType", description = "消息类型（user/ai）")
    private String messageType;

    /**
     * 应用id
     */
    @Schema(name = "appId", description = "应用id")
    private Long appId;

    /**
     * 创建用户id
     */
    @Schema(name = "userId", description = "创建用户id")
    private Long userId;

    /**
     * 游标查询 - 最后一条记录的创建时间
     * 用于分页查询，获取早于此时间的记录
     */
    @Schema(name = "lastCreateTime", description = "游标查询 - 最后一条记录的创建时间")
    private LocalDateTime lastCreateTime;

    private static final long serialVersionUID = 1L;
}

